home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: SongPlayer 1.1 (22.10.2000)
- ** © 2000 by Jacob Laursen <laursen@myself.com>
- **
- ** Set up your player path below and some of these events in Amster:
- **
- ** Download finished
- ** Double-clicking library file
- ** Double-clicking download file
- ** MP3 player
- **
- ** To play the file immediately:
- ** Command: RexxC:RX Apps:Comm/Amster/Rexx/SongPlayer.rexx PLAY "%f"
- **
- ** To add the file to the playlist:
- ** Command: RexxC:RX Apps:Comm/Amster/Rexx/SongPlayer.rexx ADD "%f"
- **
- ** To add the file to the playlist and play only if the player is stopped or paused:
- ** Command: RexxC:RX Apps:Comm/Amster/Rexx/SongPlayer.rexx ADDPLAY "%f"
- */
-
- PlayerPath = 'Apps:Sound/Players/SongPlayer/SongPlayer'
-
- /* No user-serviceable parts below */
-
- options results
- parse arg mode' 'filename
-
- if ~show('P','SONGPLAYER.1') then address command PlayerPath' 'filename' GUI'
- else do
- address 'SONGPLAYER.1'
- if upper(mode) = 'PLAY' then do
- 'OPEN 'filename
- PLAY
- end
- else if upper(mode) = 'ADD' | upper(mode) = 'ADDPLAY' then do
- 'ADD 'filename
- if upper(mode) = 'ADDPLAY' then do
- 'GET_STATE'; state = RESULT
- if state = 'STOP' | state = 'PAUSE' then do
- 'NEXT'; 'PLAY'
- end
- end
- end
- end
-